﻿using System;
using System.Collections.Generic;

namespace T.FAS.Runtime.Metadata.Entity
{
    /// <summary>
    /// Schema
    /// </summary>
    [Serializable]
    public sealed class RefSchema 
    {
        public RefSchemaTopLayer Schema { get; set; }
    }

    /// <summary>
    /// Schema顶级节点
    /// </summary>
    [Serializable]
    public sealed class RefSchemaTopLayer
    {
        //数据建模
        public RefSchemaEntityColle SDO { get; set; }
        public RefSchemaEntityColle DO { get; set; }
        public RefSchemaEntityColle CDO { get; set; }
        public RefSchemaEntityColle EO { get; set; }
        public RefSchemaEntityColle StateMachine { get; set; }
        public RefSchemaEntityColle DQ { get; set; }
        //Action 计划任务
        public RefSchemaEntityColle Action { get; set; }
        public RefSchemaEntityColle ScheduleJob { get; set; }
        //主题 菜单 Page 用户组件
        //public RefSchemaEntityColle Project { get; set; }
        public RefSchemaEntityColle Page { get; set; }
        public RefSchemaEntityColle UIControl { get; set; }
        public RefSchemaEntityColle DefaultTheme { get; set; }
        public RefSchemaEntityColle Theme { get; set; }
        public RefSchemaEntityColle Menu { get; set; }
        //权限
        public RefSchemaEntityColle BPO { get; set; }
        public RefSchemaEntityColle DPD { get; set; }
        public RefSchemaEntityColle DPO { get; set; }
        //工作流 审批流 任务
        public RefSchemaEntityColle Task { get; set; }
        public RefSchemaEntityColle WF { get; set; }
        public RefSchemaEntityColle AF { get; set; }
    }

    /// <summary>
    /// Schema实体集合
    /// </summary>
    [Serializable]
    public class RefSchemaEntityColle : Dictionary<string, IRefSchemaEntity>
    {

    }

    /// <summary>
    /// Schema实体
    /// </summary>
    public interface IRefSchemaEntity
    {
        string ID { get; set; }
        string Code { get; set; }
        string Name { get; set; }
    }
}
